Skip to content

Conversation

@aspeddro
Copy link
Collaborator

@aspeddro aspeddro commented Dec 4, 2022

Example from rescript-nodejs

type subtype<'ty> constraint 'ty = [> kind]
yarn run v1.22.19
$ /home/pedro/Desktop/projects/tree-sitter-rescript/node_modules/.bin/tree-sitter parse ../../test-filetypes/rescript_print.res
(source_file [0, 0] - [1, 0]
  (ERROR [0, 0] - [1, 0]
    (type_declaration [0, 0] - [0, 17]
      (type_identifier [0, 5] - [0, 12])
      (type_parameters [0, 12] - [0, 17]
        (type_identifier [0, 13] - [0, 16])))))
../../test-filetypes/rescript_print.res	0 ms	(ERROR [0, 0] - [1, 0])
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

)),
repeat($.type_constraint),
)),
optional(alias($._type_declaration_and, $.type_declaration))
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this change type t and b is valid.

@nkrkv
Copy link
Collaborator

nkrkv commented Dec 5, 2022

👍

@nkrkv nkrkv merged commit d24fbeb into rescript-lang:main Dec 5, 2022
@aspeddro aspeddro deleted the fix-constraint branch December 6, 2022 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants